Skip to content

Fix TypeScript starter restore failure by stopping pipeline early (Fixes #15420)#15694

Open
michalkalit wants to merge 1 commit intomicrosoft:mainfrom
michalkalit:fix/fail-early-on-npm-missing
Open

Fix TypeScript starter restore failure by stopping pipeline early (Fixes #15420)#15694
michalkalit wants to merge 1 commit intomicrosoft:mainfrom
michalkalit:fix/fail-early-on-npm-missing

Conversation

@michalkalit
Copy link
Copy Markdown

Description

Please include a summary of the changes and the related issue. Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes # (issue)

Checklist

  • Is this feature complete?
    • [x ] Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • [x ] No
  • Did you add public API?
    • Yes
      • If yes, did you have an API Review for it?
        • Yes
        • No
      • Did you add <remarks /> and <code /> elements on your triple slash comments?
        • Yes
        • [ x] No
    • [ x] No
  • Does the change make any security assumptions or guarantees?
    • Yes
      • If yes, have you done a threat model and had a security review?
        • Yes
        • No
    • [x ] No
  • Does the change require an update in our Aspire docs?
    • Yes
    • [x ] No

@github-actions
Copy link
Copy Markdown
Contributor

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 15694

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 15694"

if (appHostProject is not IGuestAppHostSdkGenerator guestProject)
{
_interactionService.DisplayError("Automatic 'aspire restore' is unavailable for the new TypeScript starter project because no TypeScript AppHost SDK generator was found.");
if (Directory.Exists(outputPath))
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One thing I’m considering: if the output directory already exists, we shouldn’t delete it on restore failure.
I can update the PR to only delete directories created by the template.
Let me know if you prefer that approach.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant